﻿using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using AMG.Model;
using AMG.BLL.User;

namespace AMG.Web
{
    public partial class logout : AMG.Web.UI.Page.BasePage
    {
        protected new int UserID = 0;
        protected void Page_Load(object sender, EventArgs e)
        {
            UserID = GetCurrentUserID();
            //UserInfo ui = new User().GetUserInfo(UserID);
            HttpCookie cookieToken = Context.Request.Cookies["AMGCookie"];
            if (cookieToken != null)
            {
                cookieToken.Values.Clear();
                cookieToken.Domain = AMG.Config.UiConfig.CookieDomain;
                cookieToken.Expires = DateTime.Now.AddDays(20);
                Response.SetCookie(cookieToken);
            }
            Response.Redirect("/login.aspx");
        }
    }
}
